package query

import (
	"errors"
)

type PositionQuery struct {
	PositionKey   string `form:"positionKey"  search:"type:exact;column:label;table:t_position"`
	PositionValue string `form:"positionValue"  search:"type:exact;column:value;table:t_position"`
}

func (m *PositionQuery) GetNeedSearch() interface{} {
	return *m
}
func (m *PositionQuery) GetId() (id interface{}, err error) {
	if len(m.PositionKey) == 0 {
		return nil, errors.New("ID不能为空")
	}
	return *m, nil
}
